package cn.smbms.biz.impl;

import java.util.List;

import cn.smbms.dao.IStaffDao;
import cn.smbms.bean.model.Staff;
import cn.smbms.bean.vo.StaffVo;
import cn.smbms.biz.IStaffBiz;

public class StaffBizImpl implements IStaffBiz {
	private IStaffDao dao;
	public IStaffDao getDao() {
		return dao;
	}
	public void setDao(IStaffDao dao) {
		this.dao = dao;
	}

	//根据用户名获取用户信息
	@Override
	public List<Staff> getStaffByStaffVo(StaffVo staffVo) {
		return dao.getStaffByStaffVo(staffVo);
	}
	
	//添加用户
	@Override
	public int add(Staff staff) {
		return dao.add(staff);
	}

	//根据用户帐号查询用户信息
	@Override
	public Staff findStaffByStaffNum(String staffNum) {
		return dao.findStaffByStaffNum(staffNum);
	}
	
	//更新用户信息
	@Override
	public int update(Staff staff) {
		return dao.update(staff);
	}

	//删除用户信息
	@Override
	public int delete(int staffId) {
		return dao.delete(staffId);
	}
	
	//验证登录
	@Override
	public Staff checkLogin(Staff staff) {
		return dao.checkLogin(staff);
	}
	
	//获取总页
	@Override
	public StaffVo getTotalPages(StaffVo staffVo) {
		return dao.getTotalPages(staffVo);
	}
}
